<?php
namespace Ana\AgendaBundle\Entity;

use Doctrine\ORM\Mapping as ORM;


/**
 * @ORM\Entity(repositoryClass="Ana\AgendaBundle\Entity\TurnoRepository")
 * @ORM\Table(name="turno")
 * @ORM\HasLifecycleCallbacks()
 */

class Turno{
    
    /**
    * @ORM\Column(type="integer")
    * @ORM\Id
    * @ORM\GeneratedValue(strategy="AUTO")
    */
    public $id;
    
    /**
    * @ORM\Column(type="datetime")
    */
    public $empieza;
    
    /**
    * @ORM\Column(type="datetime")
    */
    public $termina;
    
    /**
    * @ORM\ManyToOne(targetEntity="Servicio")
    * @ORM\JoinColumn(name="servicio_id", referencedColumnName="id")
    **/
    public $servicio;
    
    /**
     * @ORM\ManyToOne(targetEntity="Paciente", inversedBy="turnos")
     * @ORM\JoinColumn(name="paciente_id", referencedColumnName="id")
     **/
    private $paciente;
    
    /**
    * @ORM\ManyToOne(targetEntity="Jornada")
    * @ORM\JoinColumn(name="jornada_id", referencedColumnName="id")
    **/
    public $jornada;

    /**
     * Set empieza
     *
     * @param \DateTime $empieza
     * @return Turno
     */
    public function setEmpieza($empieza)
    {
        $this->empieza = $empieza;

        return $this;
    }

    /**
     * Get empieza
     *
     * @return \DateTime 
     */
    public function getEmpieza()
    {
        return $this->empieza;
    }

    /**
     * Set termina
     *
     * @param \DateTime $termina
     * @return Turno
     */
    public function setTermina($termina)
    {
        $this->termina = $termina;

        return $this;
    }

    /**
     * Get termina
     *
     * @return \DateTime 
     */
    public function getTermina()
    {
        return $this->termina;
    }

    /**
     * Set servicio
     *
     * @param \Ana\AgendaBundle\Entity\Servicio $servicio
     * @return Turno
     */
    public function setServicio(\Ana\AgendaBundle\Entity\Servicio $servicio = null)
    {
        $this->servicio = $servicio;

        return $this;
    }

    /**
     * Get servicio
     *
     * @return \Ana\AgendaBundle\Entity\Servicio 
     */
    public function getServicio()
    {
        return $this->servicio;
    }

    /**
     * Set paciente
     *
     * @param \Ana\AgendaBundle\Entity\Paciente $paciente
     * @return Turno
     */
    public function setPaciente(\Ana\AgendaBundle\Entity\Paciente $paciente = null)
    {
        $this->paciente = $paciente;

        return $this;
    }

    /**
     * Get paciente
     *
     * @return \Ana\AgendaBundle\Entity\Paciente 
     */
    public function getPaciente()
    {
        return $this->paciente;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set jornada
     *
     * @param \Ana\AgendaBundle\Entity\Jornada $jornada
     * @return Turno
     */
    public function setJornada(\Ana\AgendaBundle\Entity\Jornada $jornada = null)
    {
        $this->jornada = $jornada;

        return $this;
    }

    /**
     * Get jornada
     *
     * @return \Ana\AgendaBundle\Entity\Jornada 
     */
    public function getJornada()
    {
        return $this->jornada;
    }
}
